<style src="./price-user-list.css" scoped ></style>
<template>
  <vue-tab current="prize"></vue-tab>
  <div class="sec-top row">
    <form class="form-inline col-sm-8" @submit.prevent="getList">
      <div class="form-group form-group-sm">
        <label>手机号:</label>
        <input type="text" class="form-control" v-model="phone" placeholder="">
        <label>发放奖品状态:</label>
        <select class="form-control" v-model="status">
          <option value="" selected>全部</option>
          <option value="0" >待发放</option>
          <option value="1" >已发放</option>
          <option value="2">不发放</option>
        </select>
        <input type="submit" class="btn btn-sm btn-primary" value="搜索">
      </div>
    </form>
    <div class="col-sm-4 text-right">
      <input type="button" :disabled="noPrice" class="btn btn-sm btn-primary"  @click="sent()" value="发奖">
      <input type="button" :disabled="noPrice" class="btn btn-sm btn-primary"  @click="noSent()" value="不发奖">
    </div>
  </div>
  <table class="table table-bordered table-hover">
    <caption>用户列表</caption>
    <thead>
      <tr>
        <th class="text-center">
          全选<input type="checkbox" v-model="checkAll">
        </th>
        <th>customerid</th>
        <th>手机号</th>
        <th>发放奖品状态</th>
        <th>创建时间</th>
        <th>发放时间</th>
        <th>券码</th>
        <!--<th></th>-->
      </tr>
    </thead>
    <tbody>
      <tr v-for="item in userList">
        <td class="text-center"><input type="checkbox" value={{item.phone}} v-model="checkedNames"></td>
        <td>{{item.userId}}</td>
        <td>{{item.phone}}</td>
        <td>{{item.send}}</td>
        <td>{{item.createTime | toDate}}</td>
        <td>{{item.awardTime}}</td>
        <td>{{item.prizeCode}}</td>
        <!--<td> <span>Checked names: {{ checkedNames | json }}</span></td>-->
        <!--<td class="text-right">
          <button v-if="item.status !== 'SUCCESS' && item.status !== 'INVALID'" class="btn btn-sm btn-primary" @click="invalidOrder(item)">失效</button>
        </td>-->
      </tr>
    </tbody>
  </table>
  <vue-pages :pages.sync="pages" :get-list="getList"></vue-pages>
</template>

<script type="text/javascript" src="./price-user-list.js"></script>
